package com.itheima;

public class Array {
    public static void main(String[] args) {
        int[][] arr = new int[5][5];
        int Max = 0;
        int num;
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5; j++) {
                arr[i][j] = (int)(Math.random()*100);
            }
        }
        for (int i = 0; i < 5; i++) {
            System.out.println();
            for (int j = 0; j < 5; j++) {
                System.out.print(arr[i][j]+" ");
                if(Max<arr[i][j]){
                    Max=arr[i][j];
                }
            }
        }
        System.out.println("最大值为:"+Max);
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5; j++) {
                if(arr[i][j]==Max){
                    System.out.println("坐标为["+i+"] ["+j+"]");
                }
            }
        }
    }
}
